export default (updateTime) => {
	updateTime=updateTime*1000
	if (updateTime === null) {
	        return ''
	    }
	    let now = new Date().getTime()
	    let second = Math.floor((now - updateTime) / (1000))
	    let minute = Math.floor(second / 60)
	    let hour = Math.floor(minute / 60)
	    let day = Math.floor(hour / 24)
	    let month = Math.floor(day / 31)
	    let year = Math.floor(month / 12)
	    if (year > 0) {
	        return year + '年前'
	    } else if (month > 0) {
	        return month + '月前'
	    } else if (day > 0) {
	        return day + '天前'
	    } else if (hour > 0) {
	        return hour + '小时前'
	    } else if (minute > 0) {
	        return minute + '分钟前'
	    } else if (second > 0) {
	        return second + '秒前'
	    } else {
	        return '刚刚'
	    }
}
